﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Drawing;
public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        int width = 400, hight = 250;
        Bitmap bitmap = new Bitmap(width, hight);
        Graphics g = Graphics.FromImage(bitmap);
        try
        {
            g.Clear(Color.YellowGreen);
            Pen myPen = new Pen(Color.Blue);
            g.DrawEllipse(myPen,50,60,80,80);
            System.IO.MemoryStream ms = new System.IO.MemoryStream();
            bitmap.Save(ms, System.Drawing.Imaging.ImageFormat.Gif);
            Response.ClearContent();
            Response.ContentType = ("image/Gif");
            Response.BinaryWrite(ms.ToArray());
        }   
        catch (Exception ms)
        {
            Response.Write(ms.Message);
        }
    }
}